package com.xnx3.j2ee.system;

import com.xnx3.j2ee.log.Log;
import com.xnx3.j2ee.pojo.constant.LogOption;
import com.xnx3.j2ee.service.ApiService;
import com.xnx3.j2ee.service.RoleService;
import com.xnx3.j2ee.service.SqlCacheService;
import com.xnx3.j2ee.service.SqlService;
import com.xnx3.j2ee.service.SystemService;
import com.xnx3.j2ee.service.UserService;
import com.xnx3.j2ee.service.impl.ApiServiceImpl;
import com.xnx3.j2ee.service.impl.RoleServiceImpl;
import com.xnx3.j2ee.service.impl.SqlCacheServiceImpl;
import com.xnx3.j2ee.service.impl.SqlServiceImpl;
import com.xnx3.j2ee.service.impl.SystemServiceImpl;
import com.xnx3.j2ee.service.impl.UserServiceImpl;
import com.xnx3.j2ee.util.ConsoleUtil;
import org.springframework.boot.autoconfigure.web.ErrorProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;

/**
 * WM 的配置，service、dao等
 * @author Hare
 */
@Configuration
@Order(11)
public class WMConfig {
	
	public WMConfig() {
		ConsoleUtil.info("Spring Scan : WMConfig");
	}

	@Bean
	public ApiService apiService(){
		return new ApiServiceImpl();
	}
	@Bean
	public RoleService roleService(){
		return new RoleServiceImpl();
	}
	@Bean
	public SqlCacheService sqlCacheService(){
		return new SqlCacheServiceImpl();
	}
	@Bean
	public SqlService sqlService(){
		return new SqlServiceImpl();
	}
	@Bean
	public SystemService systemService(){
		return new SystemServiceImpl();
	}
	@Bean
	public UserService userService(){
		return new UserServiceImpl();
	}
	@Bean
	public ErrorProperties errorProperties(){
		return new ErrorProperties();
	}
	@Bean
	public LogOption logOption(){
		return new LogOption();
	}
	@Bean
	public Log log(){
		return new Log();
	}

	
}
